package com.zjsd.sqeybusiness.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsd.sqeybusiness.mapper.JobrecordMapper;
import com.zjsd.sqeybusiness.domain.Jobrecord;
import com.zjsd.sqeybusiness.service.IJobrecordService;

/**
 * 当天工作内容
Service业务层处理
 *
 * @author Zheng
 * @date 2022-06-23
 */
@Service
public class JobrecordServiceImpl implements IJobrecordService
{
    @Autowired
    private JobrecordMapper jobrecordMapper;

    /**
     * 查询当天工作内容

     *
     * @param recordid 当天工作内容
ID
     * @return 当天工作内容

     */
    @Override
    public Jobrecord selectJobrecordById(Long recordid)
    {
        return jobrecordMapper.selectJobrecordById(recordid);
    }

    /**
     * 查询当天工作内容
列表
     *
     * @param jobrecord 当天工作内容

     * @return 当天工作内容

     */
    @Override
    public List<Jobrecord> selectJobrecordList(Jobrecord jobrecord)
    {
        return jobrecordMapper.selectJobrecordList(jobrecord);
    }

    /**
     * 新增当天工作内容

     *
     * @param jobrecord 当天工作内容

     * @return 结果
     */
    @Override
    public int insertJobrecord(Jobrecord jobrecord)
    {
        jobrecord.setLrtime(new Date());
        return jobrecordMapper.insertJobrecord(jobrecord);
    }

    /**
     * 修改当天工作内容

     *
     * @param jobrecord 当天工作内容

     * @return 结果
     */
    @Override
    public int updateJobrecord(Jobrecord jobrecord)
    {
        return jobrecordMapper.updateJobrecord(jobrecord);
    }

    /**
     * 批量删除当天工作内容

     *
     * @param recordids 需要删除的当天工作内容
ID
     * @return 结果
     */
    @Override
    public int deleteJobrecordByIds(Long[] recordids)
    {
        return jobrecordMapper.deleteJobrecordByIds(recordids);
    }

    /**
     * 删除当天工作内容
信息
     *
     * @param recordid 当天工作内容
ID
     * @return 结果
     */
    @Override
    public int deleteJobrecordById(Long recordid)
    {
        return jobrecordMapper.deleteJobrecordById(recordid);
    }
}
